#ifndef SRTF_SCHEDULER
#define SRTF_SCHEDULER
#include "Scheduler.h"

class SRTF_Scheduler : public Abstract_CPUScheduler
{
	public:
		SRTF_Scheduler();
		void sortProcesses();
		void runScheduler();
		void printList();

	private:
		bool compareArrivalTime(vector<Process>::iterator positionOne, vector<Process>::iterator positionTwo);
		bool compareBurstTime(vector<Process>::iterator positionOne, vector<Process>::iterator positionTwo);
		bool needSwitched(vector<Process>::iterator begin, int arrival_difference);
		void sortByBurstTime(vector<Process>::iterator positionOne, vector<Process>::iterator positionTwo, vector<Process> &queue);
		void getQueuedProcesses(vector<Process> &available_queue, vector<Process>::iterator &processListItr, int prevProcEndTime);
		void assignValuesToProcessList(Process temp);
		void findProcessID(vector<Process>::iterator &location, int processID);

};

#endif